

void S25FL032P_RD_PAGE(uint32_t Address,  uint16_t  *pSPIReceiveData);
uint16_t S25FL032P_STATUS_RD();
uint8_t S25FL032P_Configure_RD();
void  S25FL032P_Prog_Page(  uint32_t Address,  uint16_t  *pSPISendData);
void  S25FL032P_Sector_Erase(  uint32_t Address);
void S25FL032P_WriteEnable();
void S25FL032P_WriteStatusRegister(  uint8_t StatusValue, uint8_t ConfigureValue);
void S25FL032P_QuadWrite_PAGE(  uint32_t Address,  uint16_t  *pSPISendData);
void S25FL032P_RDID(uint16_t  *pSPIReceiveData);
void S25FL032P_QuadRD_PAGE(  uint32_t Address,  uint16_t  *pSPIReceiveData);


/* S25FLO32P flash chip command definitions */
#define S25FL032P_CM_READ   	0x03
#define S25FL032P_CM_READ_FAST 	0x0B
#define S25FL032P_CM_QUAL_READ  0x3B
#define S25FL032P_CM_QUAD_READ  0x6B
#define S25FL032P_CM_ID_READ    0x9F

#define S25FL032P_CM_WRITE_EN  	0x06
#define S25FL032P_CM_WRITE_DIS 	0x06

#define S25FL032P_CM_ERASE_P4E 	0x20 // 4KB sector
#define S25FL032P_CM_ERASE_P8E 	0x40 // 8KB sector
#define S25FL032P_CM_ERASE_SE 	0xD8 // 64KB sector

#define S25FL032P_CM_PROG_PAGE 	0x02 // page programming
#define S25FL032P_CM_PROG_QPAGE 0x32 // quad page programming

#define S25FL032P_CM_REG_WRITE 		0x01 //  write status and configure register
#define S25FL032P_CM_REG_READ_ST  	0x05 //  read status register
#define S25FL032P_CM_REG_READ_CFG	0x35 //  read configure register
#define S25FL032P_CM_REG_RESET 		0x30 //  reset the erase and program fall flag

#define DUMMY						0xFFFF
